Xbasic
SQL::ResultSetFetchPage Method
Syntax
Result as L = FetchPage(Table as P, StartRow as N [, Rows as N [, RemapOffset as N [, NotificationInterval as N [, EventScript as C]]]])
Arguments
- Table
A pointer to an open table.
- StartRow
The first row to return.
- Rows
Optional. Default = -1 (all). The number of rows to return.
- RemapOffset
Optional. Numeric
- NotificationInterval
Numeric
- EventScript
Character
Returns
- ResultLogical
Returns true (.T.) if the operation was successful; otherwise false (.F.).
Description
Fetch a block of one or more rows into a local cache table. Note: This function is an advanced user feature and requires some understanding of caching for SQL.
Discussion
The FetchPage() method returns a block of one or more rows in a SQL::ResultSet into a local cache table. This function is an advanced user feature and requires some understanding of caching for SQL.
Example
dim conn as SQL::Connection dim rs as SQL::ResultSet dim cr as SQL::Row dim dti as SQL::DataTypeInfo dim connString as C dim select_exp as C dim tbl as P connString = "{A5API='Access', FileName='c:\program files\a5v8\mdbfiles\alphasports.mdb'}" select_exp = "select Lastname from customer where bill_state_region = 'ma'" tbl = table.open("customer") if .not. conn.open(connString) ui_msg_box("Error", conn.CallResult.text) end end if if .not. conn.execute(select_exp) ui_msg_box("Error", conn.CallResult.text) end end if rs = conn.ResultSet if .not. rs.fetchPage(tbl,1) then ui_msg_box("Error", rs.callResult.text) end end if conn.close() tbl.close()
Limitations
Not supported in Community Edition